Optimal. Leaf size=101 \[ -2 a b d n x+2 b^2 d n^2 x+\frac {1}{4} b^2 e n^2 x^2-2 b^2 d n x \log \left (c x^n\right )-\frac {1}{2} b e n x^2 \left (a+b \log \left (c x^n\right )\right )+d x \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )^2 \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {2367, 2333,
2332, 2342, 2341} \begin {gather*} d x \left (a+b \log \left (c x^n\right )\right )^2-\frac {1}{2} b e n x^2 \left (a+b \log \left (c x^n\right )\right )+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )^2-2 a b d n x-2 b^2 d n x \log \left (c x^n\right )+2 b^2 d n^2 x+\frac {1}{4} b^2 e n^2 x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2332
Rule 2333
Rule 2341
Rule 2342
Rule 2367
Rubi steps
\begin {align*} \int (d+e x) \left (a+b \log \left (c x^n\right )\right )^2 \, dx &=\int \left (d \left (a+b \log \left (c x^n\right )\right )^2+e x \left (a+b \log \left (c x^n\right )\right )^2\right ) \, dx\\ &=d \int \left (a+b \log \left (c x^n\right )\right )^2 \, dx+e \int x \left (a+b \log \left (c x^n\right )\right )^2 \, dx\\ &=d x \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )^2-(2 b d n) \int \left (a+b \log \left (c x^n\right )\right ) \, dx-(b e n) \int x \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=-2 a b d n x+\frac {1}{4} b^2 e n^2 x^2-\frac {1}{2} b e n x^2 \left (a+b \log \left (c x^n\right )\right )+d x \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )^2-\left (2 b^2 d n\right ) \int \log \left (c x^n\right ) \, dx\\ &=-2 a b d n x+2 b^2 d n^2 x+\frac {1}{4} b^2 e n^2 x^2-2 b^2 d n x \log \left (c x^n\right )-\frac {1}{2} b e n x^2 \left (a+b \log \left (c x^n\right )\right )+d x \left (a+b \log \left (c x^n\right )\right )^2+\frac {1}{2} e x^2 \left (a+b \log \left (c x^n\right )\right )^2\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 77, normalized size = 0.76 \begin {gather*} \frac {1}{4} x \left (b e n x \left (-2 a+b n-2 b \log \left (c x^n\right )\right )+4 d \left (a+b \log \left (c x^n\right )\right )^2+2 e x \left (a+b \log \left (c x^n\right )\right )^2-8 b d n \left (a-b n+b \log \left (c x^n\right )\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.15, size = 1545, normalized size = 15.30
method | result | size |
risch | \(\text {Expression too large to display}\) | \(1545\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 141, normalized size = 1.40 \begin {gather*} \frac {1}{2} \, b^{2} x^{2} e \log \left (c x^{n}\right )^{2} - \frac {1}{2} \, a b n x^{2} e + a b x^{2} e \log \left (c x^{n}\right ) + b^{2} d x \log \left (c x^{n}\right )^{2} - 2 \, a b d n x + \frac {1}{2} \, a^{2} x^{2} e + 2 \, a b d x \log \left (c x^{n}\right ) + 2 \, {\left (n^{2} x - n x \log \left (c x^{n}\right )\right )} b^{2} d + a^{2} d x + \frac {1}{4} \, {\left (n^{2} x^{2} - 2 \, n x^{2} \log \left (c x^{n}\right )\right )} b^{2} e \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 202 vs.
\(2 (98) = 196\).
time = 0.35, size = 202, normalized size = 2.00 \begin {gather*} \frac {1}{4} \, {\left (b^{2} n^{2} - 2 \, a b n + 2 \, a^{2}\right )} x^{2} e + \frac {1}{2} \, {\left (b^{2} x^{2} e + 2 \, b^{2} d x\right )} \log \left (c\right )^{2} + \frac {1}{2} \, {\left (b^{2} n^{2} x^{2} e + 2 \, b^{2} d n^{2} x\right )} \log \left (x\right )^{2} + {\left (2 \, b^{2} d n^{2} - 2 \, a b d n + a^{2} d\right )} x - \frac {1}{2} \, {\left ({\left (b^{2} n - 2 \, a b\right )} x^{2} e + 4 \, {\left (b^{2} d n - a b d\right )} x\right )} \log \left (c\right ) - \frac {1}{2} \, {\left ({\left (b^{2} n^{2} - 2 \, a b n\right )} x^{2} e + 4 \, {\left (b^{2} d n^{2} - a b d n\right )} x - 2 \, {\left (b^{2} n x^{2} e + 2 \, b^{2} d n x\right )} \log \left (c\right )\right )} \log \left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.21, size = 163, normalized size = 1.61 \begin {gather*} a^{2} d x + \frac {a^{2} e x^{2}}{2} - 2 a b d n x + 2 a b d x \log {\left (c x^{n} \right )} - \frac {a b e n x^{2}}{2} + a b e x^{2} \log {\left (c x^{n} \right )} + 2 b^{2} d n^{2} x - 2 b^{2} d n x \log {\left (c x^{n} \right )} + b^{2} d x \log {\left (c x^{n} \right )}^{2} + \frac {b^{2} e n^{2} x^{2}}{4} - \frac {b^{2} e n x^{2} \log {\left (c x^{n} \right )}}{2} + \frac {b^{2} e x^{2} \log {\left (c x^{n} \right )}^{2}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 225 vs.
\(2 (98) = 196\).
time = 4.09, size = 225, normalized size = 2.23 \begin {gather*} \frac {1}{2} \, b^{2} n^{2} x^{2} e \log \left (x\right )^{2} - \frac {1}{2} \, b^{2} n^{2} x^{2} e \log \left (x\right ) + b^{2} n x^{2} e \log \left (c\right ) \log \left (x\right ) + b^{2} d n^{2} x \log \left (x\right )^{2} + \frac {1}{4} \, b^{2} n^{2} x^{2} e - \frac {1}{2} \, b^{2} n x^{2} e \log \left (c\right ) + \frac {1}{2} \, b^{2} x^{2} e \log \left (c\right )^{2} - 2 \, b^{2} d n^{2} x \log \left (x\right ) + a b n x^{2} e \log \left (x\right ) + 2 \, b^{2} d n x \log \left (c\right ) \log \left (x\right ) + 2 \, b^{2} d n^{2} x - \frac {1}{2} \, a b n x^{2} e - 2 \, b^{2} d n x \log \left (c\right ) + a b x^{2} e \log \left (c\right ) + b^{2} d x \log \left (c\right )^{2} + 2 \, a b d n x \log \left (x\right ) - 2 \, a b d n x + \frac {1}{2} \, a^{2} x^{2} e + 2 \, a b d x \log \left (c\right ) + a^{2} d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.68, size = 104, normalized size = 1.03 \begin {gather*} \ln \left (c\,x^n\right )\,\left (\frac {b\,e\,\left (2\,a-b\,n\right )\,x^2}{2}+2\,b\,d\,\left (a-b\,n\right )\,x\right )+{\ln \left (c\,x^n\right )}^2\,\left (\frac {e\,b^2\,x^2}{2}+d\,b^2\,x\right )+\frac {e\,x^2\,\left (2\,a^2-2\,a\,b\,n+b^2\,n^2\right )}{4}+d\,x\,\left (a^2-2\,a\,b\,n+2\,b^2\,n^2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________